package model.happy;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import model.admin.OptionalServiceVO;

import com.ibatis.sqlmap.client.SqlMapClient;

public class HappyTimeDao {
	private SqlMapClient sqlMapClient;
	public HappyTimeDao(SqlMapClient sqlMapClient){
		this.sqlMapClient=sqlMapClient;
	}
	
	public List<HashMap> happytime(String pageNo) throws SQLException {
		return sqlMapClient.queryForList("happy.happytime",pageNo);
	}
	public int getTotalContent() throws SQLException{
		return (Integer)sqlMapClient.queryForObject("happy.getTotalContent");
	}

	public OptionalServiceVO intoAlbum(OptionalServiceVO osvo) throws SQLException {
		return (OptionalServiceVO) sqlMapClient.queryForObject("happy.intoAlbum",osvo);
	}

	public HashMap coupleFindById(String id) throws SQLException {
		return (HashMap) sqlMapClient.queryForObject("happy.coupleFindById",id);
	}

	public List showHappyMoney() throws SQLException {
		return sqlMapClient.queryForList("happy.showHappyMoney");
	}
}
